import ajax from "./ajax";
const BASE = "http://127.0.0.1:3000";

// 获取用户信息
export const reqUserinfo = () => ajax(BASE + "/user/userinfo");
// 添加用户
export const reqInsertUser = (userinfo) =>ajax(BASE + "/user/insertuser", { userinfo });
// 修改用户
export const reqUpdata = (userinfo) => ajax(BASE + "/user/updata",{userinfo});
// 删除用户
export const reqDeldata = (id) => ajax(BASE+'/user/deluser',{id:id})
// 搜索用户
export const reqSearch = (search) =>ajax(BASE+'/user/search',{search})